using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Hermes.Framework.FileSystem;
using Hermes.Framework.FileSystem.Ftp;

namespace Hermes.Framework.Test
{
    [TestFixture]
    public class FtpTest
    {
        protected FtpExpress ftp = null;

        [SetUp]
        public void SetUp()
        {
            this.ftp = new FtpExpress();
            this.ftp.Connect(new ConnectionInfo("192.168.87.129", 21, "root", "plokij"));
        }

        [TearDown]
        public void TearDown()
        {
            this.ftp.Dispose();
        }

        [Test]
        public void TestCopy()
        {
            string from = @"file://C:\source.txt";
            string to = @"ftp://192.168.87.129:21/ftproot/source.txt";

            this.ftp.Copy(from, to);
        }

        static void Main(string[] args)
        {
            FtpTest test = new FtpTest();
            test.SetUp();
            test.TestCopy();
        }
    }
}
